QuickOPC User's Guide and Reference
StreamLoader<TValue> Constructor(Func<Stream,ValueResult<TValue>>,IInformationResourceHandler<Stream>)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.IO Namespace > StreamLoader<TValue> Class > StreamLoader<TValue> Constructor : StreamLoader<TValue> Constructor(Func<Stream,ValueResult<TValue>>,IInformationResourceHandler<Stream>)
The function that reads the value from the stream.
Information resource handler for the stream.
Initializes a new instance of the class, given the function to read the value from the stream, and a stream resource handler.
Syntax
'Declaration
 
Public Function New( _
   ByVal fromStreamFunction As Func(Of Stream,ValueResult(Of TValue)), _
   ByVal streamResourceHandler As IInformationResourceHandler(Of Stream) _
)
'Usage
 
Dim fromStreamFunction As Func(Of Stream,ValueResult(Of TValue))
Dim streamResourceHandler As IInformationResourceHandler(Of Stream)
 
Dim instance As New StreamLoader(Of TValue)(fromStreamFunction, streamResourceHandler)
public StreamLoader<TValue>( 
   Func<Stream,ValueResult<TValue>> fromStreamFunction,
   IInformationResourceHandler<Stream> streamResourceHandler
)
public:
StreamLoader<TValue>( 
   Func<Stream^,ValueResult<TValue^>^>^ fromStreamFunction,
   IInformationResourceHandler<Stream^>^ streamResourceHandler
)

Parameters

fromStreamFunction
The function that reads the value from the stream.
streamResourceHandler
Information resource handler for the stream.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also